<?php
if(isset($_REQUEST['contactformid']) && $_REQUEST['contactformid'] == 1){
	
	$youremail = "inancm.dev@gmail.com"; // Enter your email here!!

	$usersname = $_REQUEST["usersname"];
	$usersemail = $_REQUEST["usersemail"];
	$usersphonenumber = $_REQUEST["usersphonenumber"];
	$usersmessage = $_REQUEST["usersmessage"];
	$subject = 'Message From iNan..CM';
	$message = "<html>
					<head>
					<title>Message from website Thaibamboo</title>
					</head>
					<body>
						<p>$usersname has contacted you from your site.</p>
						<h3>Their Message is as follows:</h3>
						<p>$usersmessage</p>
						<h5>Contact details</h5>
						<p>Phone Number: $usersphonenumber</p>
						<p>Email Address: $usersemail</p>
					</body>
				</html>"; 
	$headers  = 'MIME-Version: 1.0' . "\r\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";		
	$headers .= 'From:' . $usersemail . "\r\n";
	$statusSend = mail($youremail, $subject, $message, $headers);
	
	//echo $statusSend;
	echo '<p>Thank you for your email, a member of our staff will contact you soon regarding your email!</p>';

} else {
	echo '<p>Form could not be sent, please try again!</p>';
}
?>